import { MockMethod } from "vite-plugin-mock"

export default [
  {
    url: "/dev-api/system/menu/user",
    timeout: 2000,
    method: "get",
    response: () => {
      return {
        "code": 20000,
        "message": "查询成功",
        "data": {
          "userInfo": {
            "nickName": "@cname",
            "username": "@word(10)",
            "imageUrl": "@image",
          },
          "buttonList": [
            "system:menu:search",
            "system:child:add",
            "system:menu:edit",
            "system:role:search",
            "system:role:add",
            "system:role:edit",
            "system:role:delete",
            "system:role:menu",
            "system:user:search",
            "system:user:add",
            "system:user:edit",
            "system:user:delete",
            "system:user:password",
            "goods:search",
            "goods:add",
            "goods:edit",
            "goods:delete",
            "goods:category:search",
            "goods:category:add",
            "goods:category:edit",
            "goods:category:delete"
          ],
          "menuList": [
            {
              "path": "/system",
              "name": "System",
              "redirect": "/system/menu",
              "meta": {
                "title": '系统管理',
                "icon": 'settings',
                "hidden": false,
                "isBreadcrumd": true
              },
              "children": [
                {
                  "path": '/system/menu',
                  "name": 'SystemMenu',
                  "redirect": null,
                  "component": "system/menu/index.vue",
                  "meta": {
                    "title": '菜单管理',
                    "icon": 'grid',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
                {
                  "path": '/system/role',
                  "name": 'SystemRole',
                  "component": "system/role/index.vue",
                  "meta": {
                    "title": '角色管理',
                    "icon": 'users',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
                {
                  "path": '/system/user',
                  "name": 'SystemUser',
                  "redirect": null,
                  "component": "system/user/index.vue",
                  "meta": {
                    "title": '用户管理',
                    "icon": 'user',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
                {
                  "path": '/system/dept',
                  "name": 'SystemDept',
                  "redirect": null,
                  "component": "system/dept/index.vue",
                  "meta": {
                    "title": '部门管理',
                    "icon": 'dept',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                }
              ]
            },
            {
              "path": "/energyWatch",
              "name": "EnergyWatch",
              "redirect": "/energyWatch/power",
              "meta": {
                "title": '能耗监控',
                "icon": 'activity',
                "hidden": false,
                "isBreadcrumd": true
              },
              "children": [
                {
                  "path": '/energyWatch/power',
                  "name": 'energyWatchPower',
                  "redirect": null,
                  "component": "energyWatch/power/index.vue",
                  "meta": {
                    "title": '电能监测',
                    "icon": 'zap',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
              ]
            },
            {
              "path": "/energyAnalysis",
              "name": "EnergyAnalysis",
              "redirect": "/energyAnalysis/power",
              "meta": {
                "title": '能耗分析',
                "icon": 'energyAnalysis',
                "hidden": false,
                "isBreadcrumd": true
              },
              "children": [
                {
                  "path": '/energyAnalysis/power',
                  "name": 'EnergyAnalysisPower',
                  "redirect": null,
                  "component": "energyAnalysis/power/index.vue",
                  "meta": {
                    "title": '电能分析',
                    "icon": 'powerAnalysis',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
              ]
            },
            {
              "path": "/ic",
              "name": "Ic",
              "redirect": "/ic/ac",
              "meta": {
                "title": '智能控制',
                "icon": 'ic',
                "hidden": false,
                "isBreadcrumd": true
              },
              "children": [
                {
                  "path": '/ic/ac',
                  "name": 'AirconditionControl',
                  "redirect": null,
                  "component": "ic/ac/index.vue",
                  "meta": {
                    "title": '空调控制',
                    "icon": 'ac',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
              ]
            },
            {
              "path": "/device",
              "name": "Device",
              "redirect": "/device/powerMeter",
              "meta": {
                "title": '设备管理',
                "icon": 'device',
                "hidden": false,
                "isBreadcrumd": true
              },
              "children": [
                {
                  "path": '/device/powerMeter',
                  "name": 'DevicePower',
                  "redirect": null,
                  "component": "device/powerMeter/index.vue",
                  "meta": {
                    "title": '智能电表',
                    "icon": 'powerMeter',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
                {
                  "path": '/device/gasMeter',
                  "name": 'DeviceGas',
                  "redirect": null,
                  "component": "device/gasMeter/index.vue",
                  "meta": {
                    "title": '天然气流量计',
                    "icon": 'gasMeter',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
                {
                  "path": '/device/waterMeter',
                  "name": 'DeviceWater',
                  "redirect": null,
                  "component": "device/waterMeter/index.vue",
                  "meta": {
                    "title": '水流量计',
                    "icon": 'waterMeter',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
                {
                  "path": '/device/controlGateway',
                  "name": 'ControlGateway',
                  "redirect": null,
                  "component": "/device/controlGateway/index.vue",
                  "meta": {
                    "title": '集控网关',
                    "icon": 'controlGateway',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
                {
                  "path": '/device/gatewayManage',
                  "name": 'GatewayManage',
                  "redirect": null,
                  "component": "/device/gatewayManage/index.vue",
                  "meta": {
                    "title": '网关管理',
                    "icon": 'gatewayManage',
                    "cache": true,
                    "hidden": false,
                    "isBreadcrumd": true
                  },
                  "children": []
                },
              ]
            },
            {
              "path": "/kelaiduo",
              "name": "kelaiduo", // 路由名称
              "redirect": null,
              "component": "link/index.vue",
              "meta": {
                "title": "智能管理官网",
                "icon": "link",
                "linkTo": 'https: //www.kelaiduo.com', // 外链跳转地址
                "cache": true,
                "hidden": false
              },
              "children": []
            }
          ]
        }
      }
    }
  },
] as MockMethod[]